---
description: "Reference for Nitric's v0 .NET library - Write a file to a bucket."
---

# .NET - Bucket.File.Write()

Write a file to a bucket.

```csharp
using Nitric.Sdk;
using Nitric.Sdk.Storage;

var assets = Nitric.Bucket('assets').With(BucketPermission.Reading);

var logo = assets.File('images/logo.png');

logo.Write(someImageData);

Nitric.Run();
```

## Parameters

<Properties>
  <Property name="data" required type="byte[]">
    The data to write to the file.
  </Property>
</Properties>

## Examples

### Write a file

```csharp
using Nitric.Sdk;
using Nitric.Sdk.Storage;

var assets = Nitric.Bucket('assets').With(BucketPermission.Reading);

var logo = assets.File('images/logo.png');

logo.Write(someImageData);

Nitric.Run();
```
